/*  _defs.h

	Place holder for some common Borland RTL defines and calling conventions:

	_USERENTRY		Specifies the calling convention the RTL expects user
					compiled functions to use (for callbacks)


*/

#ifndef ___DEFS_H
#define ___DEFS_H

#define _RTLENTRY
#define _USERENTRY

#define _FAR

#define _EXPCLASS
#define _EXPDATA
#define _EXPFUNC


#ifdef __GNUC__

#define __cdecl
#define __stdcall
#define __import
#define __export
#define __pascal

/* Set up some support for __int64 in gnu.  Also make inline functions
   work correctly by marking them as 'extern __inline__'.
*/
#define __int64 long long int
/* #define _INLFUNC extern __inline__ */
#define _INLFUNC static __inline
#else
#define _INLFUNC static __inline
#endif

#ifdef __GNUC__
#define __PACK(__x) __attribute__ ((aligned (__x)))
#else
#define __PACK(__x)
#endif


/** Note: if your GNU installation resides in a directory other than
	/usr/include, define _STD_HEADER_ to point to where the main GNU include
    dir is.
*/
#define _STD_HEADER_(__a) </usr/include/__a>

#ifdef __GNUC__
#define __PRAGMA_STARTUP __attribute__ ((constructor))
#define __PRAGMA_EXIT    __attribute__ ((destructor))
#else
#define __PRAGMA_STARTUP
#define __PRAGMA_EXIT
#endif

/** Note: for now, multi-threaded mode is forced on */
#define __MT__

#ifdef __MT__
#ifndef _REENTRANT
#define _REENTRANT 
#endif
#endif


#ifdef __BORLANDC__
#ifdef __MT__
#define _REENTRANT
#endif /* __MT__ */
#else  /* __BORLANDC__ */
#if !defined(__MT__) && defined(_REENTRANT)
#define __MT__
#endif
#endif /* __BORLANDC__ */


#endif /* ___DEFS_H */
